package com.atguigu.ssyx.acl.service;

import com.atguigu.ssyx.model.acl.Role;
import com.atguigu.ssyx.vo.acl.RoleQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

public interface RoleService extends IService<Role> {

    // 分页查询
    IPage<Role> selectRolePage(Page<Role> page, RoleQueryVo roleQueryVo);

    // 获取所有角色，根据id获取用户已分配角色列表
    Map<String, Object> findRoleByUserId(Long userId);

    // 给用户分配角色
    void saveAdminRole(Long adminId, List<Long> roleId);
}
